home *** CD-ROM | disk | FTP | other *** search
- /*
- * SFtoSpr - Star Fighter 3000 graphics converter
- * Utility functions
- * Copyright (C) 2000 Chris Bazley
- */
-
- #ifndef STSUtils_h
- #define STSUtils_h
-
- #include <stdbool.h>
-
- #include "kernel.h"
- #include "toolbox.h"
- #include "event.h"
-
- #include "Loader.h"
- #include "SprFormats.h"
- #include "SFformats.h"
-
- /* Generic handler for deleting an object */
- extern ToolboxEventHandler delete_object_handler;
-
- /* Allocate buffer and load animations textfile */
- extern LoaderFileHandler load_animations, load_compressed, load_sprites;
-
- /* Load animations textfile given explicit filepath */
- extern _kernel_oserror *load_animsfilepath(char *filepath, SF_MapTilesSetHdr **getanimations, bool err_if_absent);
-
- /* Write textfile with animations */
- extern _kernel_oserror *save_animsfile(char *filepath, SF_MapTilesSetHdr *putanimations);
-
- /* copy string into newly allocated memory */
- extern char *copystring(char *string);
-
- extern _kernel_oserror *showgadget(ObjectId window, ComponentId gadget);
-
- extern _kernel_oserror *hidegadget(ObjectId window, ComponentId gadget);
-
- extern _kernel_oserror *set_gadget_faded(bool fade, ObjectId id, ComponentId gad);
-
- extern _kernel_oserror *getscreencentre(int *centreX,int *centreY);
-
- extern char *tail(char *filepath, int length);
-
- extern bool check_animations(SF_MapTilesSetHdr **hdr);
- extern bool contains_valid_tiles(spriteareaheader **sa);
- extern bool contains_valid_planets(spriteareaheader **sa);
- extern bool dialogue_confirm(const char *mess);
-
- extern _kernel_oserror *open_above_iconbar(unsigned int flags, ObjectId id, ObjectId parent, ComponentId parent_component);
-
- #endif
-